Skip to content

Bump @testing-library/jest-dom from 5.16.5 to 6.6.4#228

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/testing-library/jest-dom-6.6.4
Closed

Bump @testing-library/jest-dom from 5.16.5 to 6.6.4#228
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/testing-library/jest-dom-6.6.4

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jul 28, 2025

Bumps @testing-library/jest-dom from 5.16.5 to 6.6.4.

Release notes

Sourced from @​testing-library/jest-dom's releases.

v6.6.4

6.6.4 (2025-07-26)

Performance Improvements

v6.6.3

6.6.3 (2024-10-31)

Bug Fixes

  • add vitest import when extending vitest matchers (#646) (5ba0156)

v6.6.2

6.6.2 (2024-10-17)

Bug Fixes

  • remove recursive type reference in vitest types (#636) (4468378)

v6.6.1

6.6.1 (2024-10-16)

Bug Fixes

  • fix lodash import in to-have-selection.js (#642) (ced792e)

v6.6.0

6.6.0 (2024-10-16)

Features

v6.5.0

6.5.0 (2024-08-23)

Features

  • toHaveValue: Asserting aria-valuenow (#479) (acbf416)

v6.4.8

6.4.8 (2024-07-23)

... (truncated)

Commits
  • 707e647 perf: replace chalk with picocolors (#659)
  • 918b6fb docs: add InfiniteXyy as a contributor for code, and bug (#650)
  • 5ba0156 fix: add vitest import when extending vitest matchers (#646)
  • 4468378 fix: remove recursive type reference in vitest types (#636)
  • abba961 docs: add billyjanitsch as a contributor for bug (#644)
  • 9490615 docs: add G-Rath as a contributor for code (#643)
  • ced792e fix: fix lodash import in to-have-selection.js (#642)
  • 9b14804 feat: implement toHaveSelection (#637)
  • f5b0e94 docs: add diegohaz as a contributor for ideas (#640)
  • 68e927e docs: add pwolaq as a contributor for code, and test (#639)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.16.5 to 6.6.4.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v5.16.5...v6.6.4)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 6.6.4
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 28, 2025
@fossabot
Copy link

fossabot bot commented Jul 28, 2025

fossabot is Thinking

45 of ~45 steps completed

• ✅ Starting dependency impact analysis... completed successfully (5 steps)

🔍 Review requested

I recommend proceeding with this upgrade as the critical breaking change has been successfully addressed through automated migration. The primary impact was the removal of the /extend-expect entry point in v6.0.0, which required updating the import statement in app/javascript/mastodon/test_setup.js from '@testing-library/jest-dom/extend-expect' to '@testing-library/jest-dom'. The migration plan successfully applied this change, and my validation confirmed no other breaking changes affect this codebase since it doesn't use jest-dom custom matchers or explicit TypeScript configuration for the library.

  • I examined the test setup file and confirmed direct usage of the removed /extend-expect import path1
  • I analyzed all test files to check for deprecated jest-dom matcher usage2
  • I verified the Jest configuration structure remains compatible3
  • I checked TypeScript configuration for potential breaking changes4

Migration Plan

The @testing-library/jest-dom upgrade has two breaking change descriptions that refer to the same underlying issue - the removal of the '/extend-expect' entry point in v6.0.0. Both breaking changes describe the same problem: the import path '@testing-library/jest-dom/extend-expect' no longer exists and must be changed to '@testing-library/jest-dom'. Since both breaking changes affect the same file (app/javascript/mastodon/test_setup.js) and require the same fix, they will be bundled into a single ticket. This ensures we address 100% of the breaking changes efficiently with one atomic change. — All steps completed successfully.

Step Status
Update @testing-library/jest-dom import path in test setup Fixed
Commit: 83204a6
1 file changed

Change Details

🔧 Fixed Breaking Changes (2)
🔧 @testing-library/jest-dom: The '/extend-expect' entry point was removed in v6.0.0. The import 'import '@testing-library/jest-dom/extend-expect';' in app/javascript/mastodon/test_setup.js will fail with a module not found error. This must be changed to 'import '@testing-library/jest-dom';' to work with v6.x.

Status: 🔧 Fixed - Automatically resolved

🔧 Automated Fix Applied

Fixed via 1 ticket(s): Update @testing-library/jest-dom import path in test setup

The codebase directly imports '@testing-library/jest-dom/extend-expect' which was removed in v6.0.0. This will cause a runtime module not found error that breaks all tests.

Validations (3)
  1. Found direct usage of 'import '@testing-library/jest-dom/extend-expect';' on line 1 which will fail with v6.x as this entry point was removed

  2. Jest config points to setupFilesAfterEnv: ['/app/javascript/mastodon/test_setup.js'] which loads the problematic import

  3. Confirmed widespread community reports that '/extend-expect' entry point was removed in v6.0.0, causing 'Cannot find module' errors across many projects

Citations (2)

import '@testing-library/jest-dom/extend-expect';

This import will fail with v6.x because the '/extend-expect' entry point was removed. Fix by changing to 'import '@testing-library/jest-dom';'

Additional Citations:

Summary: Community reports confirming the removal of '/extend-expect' entry point in v6.0.0 causes module not found errors

https://stackoverflow.com/questions/77328459/cannot-find-module-testing-library-jest-dom-extend-expect-from-jest-setup-js

Cannot find module '@testing-library/jest-dom/extend-expect' from 'jest.setup.js'


🔧 @testing-library/jest-dom: Removed the extend-expect script entry point - import '@testing-library/jest-dom/extend-expect' no longer works

Status: 🔧 Fixed - Automatically resolved

🔧 Automated Fix Applied

Fixed via 1 ticket(s): Update @testing-library/jest-dom import path in test setup

This describes the same breaking change as the first item. The codebase imports the removed '@testing-library/jest-dom/extend-expect' path.

Validations (2)
  1. Found the problematic import in app/javascript/mastodon/test_setup.js line 1

  2. This is a duplicate description of the same underlying issue - the removal of the extend-expect entry point

Citations (1)

import '@testing-library/jest-dom/extend-expect';

This import uses the removed extend-expect entry point and will fail with v6.x


✓ Safe Breaking Changes (3)
✓ @testing-library/jest-dom: Jest setup configuration must change from setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'] to setupFilesAfterEnv: ['@testing-library/jest-dom']

Status: ✓ Safe - No impact detected

The Jest configuration does not directly reference '@testing-library/jest-dom/extend-expect'. It uses a setup file pattern which is the recommended approach. The actual breaking change is in the setup file content, not the Jest configuration structure.

Validations (3)
  1. The Jest config uses setupFilesAfterEnv: ['/app/javascript/mastodon/test_setup.js'] which points to a setup file, not directly to the library

  2. The setup file app/javascript/mastodon/test_setup.js contains the problematic import that would need fixing

  3. No direct usage of '@testing-library/jest-dom/extend-expect' in Jest config - the config points to a setup file instead

Citations (1)

setupFilesAfterEnv: ['<rootDir>/app/javascript/mastodon/test_setup.js'],

Jest config uses proper setup file pattern, not direct library import path, so no configuration change needed


✓ @testing-library/jest-dom: TypeScript configuration changes required - types configuration pattern that worked in v5 may require updates in v6

Status: ✓ Safe - No impact detected

The project's TypeScript configuration does not explicitly configure @testing-library/jest-dom types, so it won't be affected by the TypeScript configuration changes in v6. The basic tsconfig.json setup should continue working.

Validations (3)
  1. The tsconfig.json does not include '@testing-library/jest-dom' in the types array, only basic compiler options are set

  2. No explicit types configuration for jest-dom found in tsconfig.json

  3. Found community reports of TypeScript configuration problems with v6, particularly with types array configuration

Citations (2)

"compilerOptions": {

TypeScript config uses basic setup without explicit jest-dom types configuration, so v6 TypeScript changes won't impact this project

Additional Citations:

Summary: Evidence of TypeScript configuration issues in v6, but this project doesn't use the problematic pattern

testing-library/jest-dom#559

"types": ["jest", "@testing-library/jest-dom"] not working after v6 upgrade


✓ @testing-library/jest-dom: Some matchers have been deprecated in favor of more comprehensive alternatives (e.g., prefer toHaveAccessibleErrorMessage over deprecated alternatives)

Status: ✓ Safe - No impact detected

The codebase does not use any jest-dom custom matchers in its test files. Tests rely on standard Jest matchers like toMatchSnapshot() and toEqual(), so deprecated matcher changes won't affect this project.

Validations (3)
  1. Found 10 test files but none use jest-dom custom matchers - tests use basic Jest assertions like toMatchSnapshot() and toEqual()

  2. No matches found for common jest-dom matchers like toBeInTheDocument, toHaveClass, toHaveAccessibleErrorMessage, etc.

  3. Confirmed that some matchers have been deprecated in favor of toHaveAccessibleErrorMessage and other comprehensive alternatives

Citations (2)

expect(handler.mock.calls.length).toEqual(1);

Tests use standard Jest matchers rather than jest-dom custom matchers, so deprecated matcher changes don't impact this codebase

Additional Citations:

Summary: Documentation confirming deprecated matchers exist in v6, but this project doesn't use them

https://testing-library.com/docs/ecosystem-jest-dom/

This custom matcher is deprecated. Prefer toHaveAccessibleErrorMessage instead


Was this helpful? 👍 👎

Footnotes

  1. Found import '@testing-library/jest-dom/extend-expect'; on line 1 of app/javascript/mastodon/test_setup.js which would cause module not found errors with v6.x

  2. Searched through 10 test files and found no usage of custom jest-dom matchers like toBeInTheDocument or toHaveClass - tests only use standard Jest assertions like toMatchSnapshot() and toEqual()

  3. Confirmed jest.config.js uses the recommended pattern of pointing to a setup file via setupFilesAfterEnv: ['<rootDir>/app/javascript/mastodon/test_setup.js'] rather than directly referencing the removed library path

  4. Examined tsconfig.json and found no explicit @testing-library/jest-dom types configuration, meaning the project won't be affected by TypeScript-related changes in v6.x

@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Aug 18, 2025

Superseded by #256.

@dependabot dependabot bot closed this Aug 18, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/testing-library/jest-dom-6.6.4 branch August 18, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants